<template>
  <div class="table-box">
    <ProTable ref="proRef" :columns="columns" :requestApi="demo">
      <template #tableHeader>
        <el-button type="primary">创建楼盘分机</el-button>
        <el-button type="danger">批量删除</el-button>
      </template>
    </ProTable>
  </div>
</template>

<script setup lang="ts">
import ProTable from "@/components/ProTable/index.vue";
import { ColumnProps } from "@/components/ProTable/interface";
import { ref } from "vue";

const proRef = ref<InstanceType<typeof ProTable> | null>();

const demo = () => {
  return new Promise(res => res(true));
};

const columns: ColumnProps[] = [
  { type: "selection", width: 80 },
  { prop: "name", label: "楼盘名称" },
  { prop: "belong", label: "所属区域" },
  { prop: "phone", label: "分机号码" },
  { prop: "opera", label: "操作" }
];
</script>

<style></style>
